<?php
    if(isset($user)) {
        // edycja
?>
        <input type="text" class="form-control" value="<?php echo $user['User']['username']; ?>" id="username" placeholder="Login">
        </br>
        <input type="password" class="form-control" id="password" placeholder="Hasło">
        </br>
        <input type="password" class="form-control" id="password2" placeholder="Powtórz hasło">
        </br>
        <select class="form-control" id="role">
            <option <?php if($user['User']['role'] == 2) echo 'selected="selected"' ?> value="2">Standardowy użytkownik</option>
            
            <?php if($user['User']['role'] == 1) { ?>
            	<option <?php if($user['User']['role'] == 1) echo 'selected="selected"' ?> value="1">Administrator</option>
            <?php } ?>
            
        </select>
        <input type="hidden" id="id" name="id" value="<?php echo $user['User']['id']; ?>" /><br />
<?php
    } else {
        // dodanie
?>
        <input type="text" class="form-control" id="username" placeholder="Login">
        </br>
        <input type="password" class="form-control" id="password" placeholder="Hasło">
        </br>
        <input type="password" class="form-control" id="password2" placeholder="Powtórz hasło">
        </br>
        <select class="form-control" id="role">
            <option value="2">Standardowy użytkownik</option>
            <option value="1">Administrator</option>
        </select>
<?php
    };
?>


